#ifndef _CONFIGURE_H_
#define _CONFIGURE_H_


#define BUFF_LEN 1024
#define MAX_ROOT 40
#define HIT_LEN 1
#define MAX_ITEM 50
#define MAX_MAP_ENTRY 32

struct conf
{
	char buff[BUFF_LEN];
	char *root_dir[MAX_ROOT];
	u_int root_dir_len[MAX_ROOT];
	u_int ava_root_dir[MAX_ROOT+HIT_LEN];
	u_int nava;
	u_int nroot_dir;

	char buff_map[BUFF_LEN];
	char *map_str[MAX_MAP_ENTRY];
	u_int nmap_str;
	u_int map[MAX_MAP_ENTRY];

	char buff_use_map[BUFF_LEN];
	u_int use_map;

	char buff2[BUFF_LEN];
	char *hdr[10];
	int nhdr;
	struct curl_slist *slist;

	char buffcontyp[BUFF_LEN];
	char *contyp[50];
	int ncontyp;
	char *contyp_sp[50][3];

	char buffkey[BUFF_LEN];
	char *key[MAX_ITEM];
	int keylen[MAX_ITEM];
	int nkey;

	char buffprefix[BUFF_LEN];
	u_int prefix_len;

	char buff_disk_space[BUFF_LEN];
	u_int disk_space;

	char buff_day[24];
	u_int day;
};

void free_config(struct conf *conf);
void read_config_file(struct conf *conf);
void read_config_file_simple(struct conf *conf);

#endif
